package com.chen.springcloud.demoeurekafeign.controller;

import com.chen.springcloud.democommon.Result;
import com.chen.springcloud.demoeurekafeign.service.EurekaClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class EurekaFeignController {

    @Autowired
    private EurekaClientService eurekaClientService;

    @RequestMapping("getUser")
    public Result getUser(Long userId){
        return eurekaClientService.getUser(userId);
    }
}
